package club.caihappy.Condition;

import club.caihappy.pojo.Yellow;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * Created by DELL on 2021/10/4
 **/
//自定义逻辑返回需要导入的组件
public class MyImportSelector implements ImportSelector {
    //返回值就是导入到容器中的组件的全类名
    //AnnotationMetadata；当前标注@import的类的所有注解信息
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        return new String[]{"club.caihappy.pojo.Blue", "club.caihappy.pojo.Red"};
    }
}
